5.3.3 APPX Application Design Manual

+ Chapter 1-1: Overview of Application Design
+ Chapter 1-2: Getting Started
+ Chapter 1-3: Data Dictionary
+ Chapter 1-4: Understanding Process Design
+ Chapter 1-5: Interprocess Communication
+ Chapter 1-6: Customizing Your Application
+ Chapter 1-7: The Documentation Facility
+ Chapter 1-8: Application Design Tools
+ Chapter 2-1: Data Dictionary Overview
+ Chapter 2-2: Data Dictionary Concepts
+ Chapter 2-3: Domains
+ Chapter 2-4: Files and Fields
+ Chapter 2-5: Work Fields
+ Chapter 3-1: Overview of APPX Processes
+ Chapter 3-2: Getting Started
+ Chapter 3-3: Process Definition
+ Chapter 3-4: Menu Processes
+ Chapter 3-5: Job Processes
+ Chapter 3-6: Input Processes
+ Chapter 3-7: Output Processes
+ Chapter 3-8: Update Processes
+ Chapter 3-9: Query Processes
+ Chapter 3-10: Inquiry Processes
+ Chapter 3-11: Status Processes
+ Chapter 3-12: Subroutine Processes
+ Chapter 3-13: Table Processes
+ Chapter 3-14: Automatic and Optional Children
+ Chapter 3-15: Using the Image Editor
+ Chapter 3-16: Using GUI Features of the Image Editor
+ Chapter 3-17: Using Event Points
+ Chapter 4-1: ILF Integration
+ Chapter 4-2: True/False Status Indicators
+ Chapter 4-3: Specifying Statements
+ Chapter 4-4: The ILF Editor
+ Chapter 4-5: The Appx ILF Debugger
- Chapter 4-6: ILF Keyword Reference
+ Chapter 4-7: Predefined Fields
+ Chapter 4-8: Runtime Subroutine's and Predefined Processes
+ Chapter 4-9: Appx Chart Director API

Chapter 4-6: ILF Keyword Reference

OR


The OR statement adds a second or subsequent conditional check to a preceding statement, such as the series 'IF A is true OR B is true, then...'. The OR statement itself compares the contents of two fields, or compares the contents of a field with a constant, to determine if a condition is true.

    ????? OR       ??? ?????????????????????? ??? ?? ??? ?????????????????????? ???
    (1)            (2) (3)                    (4) (5)(6) (7)                    (8)

(1) T/F execution conditions
(2) 1st application ID
(3) 1st field name or PDF
(4) 1st occurrence (constant/index)
(5) Relation (LT,GT,LE,GE,EQ,NE,IN,EX)
(6) 2nd application ID
(7) 2nd field name, PDF, or constant
(8) 2nd occurrence (constant/index)

Sets True/False Status Indicator

The OR statement may modify the current value of the next internal true/false status indicator. If the preceding statement is false and the OR statement is true, the current status of the next indicator is changed to T. See Using AND and OR Statements for more information.

Using the Statement

The OR statement specifies a relationship between two values. The valid relational operators are:

less than (LT), greater than (GT), less than or equal to (LE), greater than or equal to (GE)

equals (EQ), not equal to (NE), includes (IN), and excludes (EX).

The relation IN means 'includes'. The relation is true if the value in the second field is included in the first field, and false otherwise. If the relation is true, the predefined field TEXT AT POSITION is set to the starting position of the second field within the first field. The first field must be an alpha field; the second can be either an alpha field or a constant. Trailing blanks are ignored if the second field is a constant; however, you may specify fixed spaces (by entering underscores) to include one or more trailing spaces as part of a character string that is being searched.

Normally, an OR statement is used immediately after an IF statement. However, the OR statement will operate successfully when used after any statement that sets the true/false status indicator. See AND and OR with Statements Other Than IF.

An OR statement may also be used in conjunction with one or more AND statements. For example:

          IF       A
          AND      B
          OR       C
          AND      D

Another example is:

          IF       A
          OR       B
          AND      C
          OR       D

Each of these examples could be expanded to add more AND and OR statements in various sequences but, no matter how many there are, the rules are always the same:

Each AND or OR statement performs only two checks at most: it checks the current value of the next true/false status indicator, and it evaluates its own condition. It does not matter how many statements preceded the AND/OR statement, nor what other statements follow the AND/OR statement.

If the current status of the next indicator is already false, the AND statement is bypassed since it is no longer relevant. If the current status is true and the AND statement is true, the current status is left unchanged as T. However, if the AND statement is false, the current status of the next indicator is changed to F.

Conversely, for an OR statement, if the current status of the next indicator is already true, the OR statement is bypassed since it is no longer relevant. If the current status is false and the OR statement is false, the current status is left unchanged as F. However, if the OR statement is true, the current status of the next indicator is changed to T.

Restrictions

The OR statement supports comparisons between like data types only (alpha-to-alpha, numeric-to-numeric, date-to-date, logic-to-logic). When comparing two date fields, results can be unpredictable if you are using a date field without a century component. Confirm that your System Administrator has set up the Pivot Year environment variable to avoid unexpected results.

Related PDFs

TEXT AT POSITION

Related Statements

AND, IF

Example

This example shows how to bypass statement processing if the customer is a miscellaneous customer or has a zero balance. 

          IF       TAR CUSTOMER MISC CUSTOMER     EQ     1
          OR       TAR CUSTOMER BALANCE           EQ     0
    T     GOTO     :NO STATEMENT
          *
          *        (processing to print customer statements)
          *
          LABEL    :NO STATEMENT

Application Design Manual                                         "Powered by Appx Software"

671

©2006 By APPX Software, Inc. All Rights Reserved